from django.http import  HttpResponse
from django.shortcuts import render
from django.views.decorators.csrf import csrf_exempt


@csrf_exempt

def csrf_view(request):
    if request.method=='GET':
        return render(request,'csrf.html')
    elif request.method=='POST':
        username=request.POST.get('username')
        return HttpResponse(f"欢迎{username}！")